import request from '@/utils/request'

// 获取地图数据
export function getMapData() {
  return createAxios({
    url: "/admin/dashboard/getMapData",
    method: "get",
  });
}

// 添加多边形
export function createFence(form) {
  return createAxios({
    url: "/admin/dashboard/createFence",
    method: "post",
    data: form,
  });
}

// 获取多边形
export function getFence(id) {
  return createAxios({
    url: "/admin/dashboard/getFence?id=" + id,
    method: "get",
  });
}

// 判断是否在多边形内部
export function isInside(form) {
  return createAxios({
    url: "/admin/dashboard/isInside",
    method: "post",
    data: form,
  });
}
